projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4fbfaf
)
Geoniche: Don't crash on empty input file.
author
robertlipe
<robertlipe@gmail.com>
Mon, 10 Dec 2012 20:02:31 +0000
(20:02 +0000)
committer
robertlipe
<robertlipe@gmail.com>
Mon, 10 Dec 2012 20:02:31 +0000
(20:02 +0000)
gpsbabel/geoniche.c
patch
|
blob
|
history
diff --git
a/gpsbabel/geoniche.c
b/gpsbabel/geoniche.c
index 4e9e0d05917f0b5f7fb1a2cf660fa14d311756c6..1e6246d8e8be8359327f4f7bb8b127bef8fda679 100644
(file)
--- a/
gpsbabel/geoniche.c
+++ b/
gpsbabel/geoniche.c
@@
-203,7
+203,7
@@
geoniche_read_asc(void)
/* Process record 0 */
pdb_rec = file_in->rec_list;
- if (strcmp((char*) pdb_rec->data, Rec0Magic)) {
+ if (
!pdb_rec ||
strcmp((char*) pdb_rec->data, Rec0Magic)) {
fatal(MYNAME ": Bad record 0, not a GeoNiche file.\n");
}
pdb_rec = pdb_rec->next;